<%@ page import="fassa.Usuario" %>



<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'nome', 'error')} required">
	<label for="nome">
		<g:message code="usuario.nome.label" default="Nome" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="nome" required="" value="${usuarioInstance?.nome}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'email', 'error')} required">
	<label for="email">
		<g:message code="usuario.email.label" default="Email" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="email" name="email" required="" value="${usuarioInstance?.email}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'senha', 'error')} required">
	<label for="senha">
		<g:message code="usuario.senha.label" default="Senha" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="senha" required="" value="${usuarioInstance?.senha}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'sexo', 'error')} ">
	<label for="sexo">
		<g:message code="usuario.sexo.label" default="Sexo" />
		
	</label>
	<g:select name="sexo" from="${usuarioInstance.constraints.sexo.inList}" value="${usuarioInstance?.sexo}" valueMessagePrefix="usuario.sexo" noSelection="['': '']"/>
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'afiliacao', 'error')} ">
	<label for="afiliacao">
		<g:message code="usuario.afiliacao.label" default="Afiliacao" />
		
	</label>
	<g:textField name="afiliacao" value="${usuarioInstance?.afiliacao}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'nascimento', 'error')} required">
	<label for="nascimento">
		<g:message code="usuario.nascimento.label" default="Nascimento" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="nascimento" precision="day"  value="${usuarioInstance?.nascimento}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'nomeCientifico', 'error')} ">
	<label for="nomeCientifico">
		<g:message code="usuario.nomeCientifico.label" default="Nome Cientifico" />
		
	</label>
	<g:textField name="nomeCientifico" value="${usuarioInstance?.nomeCientifico}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'telefone', 'error')} ">
	<label for="telefone">
		<g:message code="usuario.telefone.label" default="Telefone" />
		
	</label>
	<g:textField name="telefone" value="${usuarioInstance?.telefone}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: usuarioInstance, field: 'trabalhos', 'error')} ">
	<label for="trabalhos">
		<g:message code="usuario.trabalhos.label" default="Trabalhos" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${usuarioInstance?.trabalhos?}" var="t">
    <li><g:link controller="trabalho" action="show" id="${t.id}">${t?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="trabalho" action="create" params="['usuario.id': usuarioInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'trabalho.label', default: 'Trabalho')])}</g:link>
</li>
</ul>

</div>

